package com.github.baichuan.application.scaffold.rest.dto.org;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

@Schema(title = "机构信息")
@Getter
@Setter
public class OrgForm {
    @Schema(title = "租户Id", requiredMode = Schema.RequiredMode.REQUIRED)
    @Size(max = 16, message = "租户Id最多16个字符")
    private String tenantId;

    @Schema(title = "机构唯一编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "机构唯一编码不能为空")
    @Size(max = 16, message = "机构唯一编码最多16个字符")
    private String uid;

    @Schema(title = "机构名", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "机构名不能为空")
    @Size(max = 32, message = "机构名最多32个字符")
    private String name;

    @Schema(title = "父机构Id")
    @Size(max = 16, message = "机构唯一编码最多16个字符")
    private String parentUid;
}
